Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Panel regression error: year is not regularly spaced

    Dear all,

    I have a data set of 2763 firms ỉn 3 years 2011, 2013, 2015. I considered it as a panel data: id is firm id, time space is 2 years. I want to run Discroll - Kray estimation by xtscc command but the error given back is as follow:

    year is not regularly spaced: there are contemporaneous gap(s) across all subjects in id
    r(101);

    Maybe the problem is that my time space is 2 years instead of 1 year. Since I'm new to Stata, I could not find a proper solution to this problem.

    I look forward to be supported by you all to complete my graduation thesis.

    Thanks and best regards,

  • #2
    Studying

    Code:
    help tsset
    or

    Code:
    help xtset
    points up that you should specify delta(2) as an option on whichever of those commands you used.

    If you did do that, then it's a misfeature of
    xtscc not to cope.

    But which
    xtscc are you using? You're asked to explain where community-contributed commands come from (FAQ Advice #12). In this case, the version on SSC is more up-to-date than that in the Stata Journal. At worst, create your own time variable that runs 1, 2, 3

    Code:
    egen time = group(year), label
    and xtset or tsset in terms of that (now the delta() option is not needed). That might help before you use xtscc.


    Whether panels with 3 observations in each are good for Driscoll-Kraay I really don't know.

    I look forward to be supported by you all to complete my graduation thesis.
    You're welcome here. But on Statalist, or any other similar site, the key for support is having a question that someone wants to answer, and nothing else.
    Last edited by Nick Cox; 15 Apr 2019, 03:45.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      Studying

      Code:
      help tsset
      or

      Code:
      help xtset
      points up that you should specify delta(2) as an option on whichever of those commands you used.

      If you did do that, then it's a misfeature of
      xtscc not to cope.

      But which
      xtscc are you using? You're asked to explain where community-contributed commands come from (FAQ Advice #12). In this case, the version on SSC is more up-to-date than that in the Stata Journal. At worst, create your own time variable that runs 1, 2, 3

      Code:
      egen time = group(year), label
      and xtset or tsset in terms of that (now the delta() option is not needed). That might help before you use xtscc.


      Whether panels with 3 observations in each are good for Driscoll-Kraay I really don't know.



      You're welcome here. But on Statalist, or any other similar site, the key for support is having a question that someone wants to answer, and nothing else.
      Dear Mr. Nick Cox,

      Thanks for prompt support. May I ask one more question? My data has small T and large N. When I use Hausman test, it recommends to use FEM rather than REM. However, the regression of FEM reveals that 4/6 independent variables and 1/5 control variables are significant. On the other hand, when using Pooled OLS with i.year i.industry dummies, it reveals 10/111 signficant variables. Therefore, could I consider regression model with year and industry dummies as a fixed effect model?

      Thanks and best regards,
      Daniel

      Comment


      • #4
        That's a new question -- the test is that the thread title no longer applies -- and should be asked in a new thread. I have no idea what to advise myself.

        Comment

        Working...
        X